<template>
  <div class="table">
    <ul class="table-header">  
      <li v-for="(item, index) in tableHeader" :key="index">{{item.name}}</li>
    </ul>
    <ul class="table-body">
      <li v-for="(item, index) in data" :key="index" class="table-li">
        <div>{{item.one}}</div>
        <div>{{item.two}}</div>
        <div>{{item.three}}</div>
        <div>{{item.four}}</div>
        <div>{{item.five}}</div>
        <div>{{item.six}}</div>
      </li>
    </ul>
  </div>
</template>
<script>
import TableHeader from './TableHeader'
export default {
  props: {
    tableHeader: Array,
    data: Array
  },
  components: {
    TableHeader
  }
}
</script>
<style lang="less" scoped>
  .table-header {
    color: #D0021B;
    background: #FDF8F8;
    display: flex;
    justify-content: space-around;
    > li {
      width: 30%;
      padding: 10px 0px;
      text-align: center;
    }
  }
  .table-body {
    li {
      width: 100%;
      > div {
        display: inline-block;
        width: 16.66%;
        text-align: center;
        font-size: 12px;
        height: 40px;
        line-height: 40px;
      }
    }
  }
</style>